import re

text = '''window.open('/win/' + to.replace("@", "!)*(*").replace(".", "-+-+-") + '/' + mail);'''

# 正则表达式匹配两个replace中的字符串
pattern = r'to\.replace\("@",\s*"([^"]*)"\)\.replace\("\.",\s*"([^"]*)"\)'

match = re.search(pattern, text)

if match:
    first_string = match.group(1)   # !)*(*
    second_string = match.group(2)  # -+-+-
    print(f"第一个字符串: {first_string}")
    print(f"第二个字符串: {second_string}")
